home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / type_elate.h < prev    next >
C/C++ Source or Header  |  2001-05-12  |  1KB  |  79 lines

  1.  
  2. #ifndef _TEK_TYPE_H
  3. #define    _TEK_TYPE_H 1
  4.  
  5. /*
  6. **    type.h
  7. **    types and constants for TAO Elate
  8. */
  9.  
  10. #include <elate/kn.h>
  11. #include <netinet/in.h>
  12.  
  13.  
  14. /*
  15. **    platform specific
  16. */
  17.  
  18. typedef char                TBYTE;
  19. typedef signed char            TINT8;
  20. typedef unsigned char        TUINT8;
  21. typedef signed short        TINT16;
  22. typedef unsigned short        TUINT16;
  23. typedef signed int            TINT;
  24. typedef unsigned int        TUINT;
  25. typedef float                TFLOAT;
  26. typedef    double                TDOUBLE;
  27.  
  28. #define    TALIGN_MINOR        3
  29. #define TALIGN_DEFAULT        7
  30. #define TALIGN_MAJOR        15
  31.  
  32. #ifdef TDEBUG
  33.     #include <stdio.h>
  34.     #define platform_dbprintf(a)        tracef(a)
  35.     #define platform_dbprintf1(a,b)        tracef(a,b)
  36.     #define platform_dbprintf2(a,b,c)    tracef(a,b,c)
  37. #endif
  38.  
  39.  
  40. /*
  41. **    not platform specific
  42. */
  43.  
  44. typedef void                TVOID;
  45. typedef void *                TAPTR;
  46. typedef TBYTE *                TSTRPTR;
  47. typedef TUINT                TBOOL;
  48. typedef struct
  49. {TBYTE data[16];}            TKNOB;
  50.  
  51. typedef struct                /* time/datestamp */
  52. {
  53.     TUINT sec;                /* seconds */
  54.     TUINT usec;                /* microseconds */
  55. }    TTIME;
  56.  
  57.  
  58.  
  59. #define TNULL                0
  60. #define TTRUE                1
  61. #define TFALSE                0
  62. #define TABS(a)                ((a)>0?(a):-(a))
  63. #define TMIN(a,b)            ((a)<(b)?(a):(b))
  64. #define TMAX(a,b)            ((a)>(b)?(a):(b))
  65. #define TCLAMP(min,x,max)    ((x)>(max)?(max):((x)<(min)?(min):(x)))
  66. #define TPI                    3.14159265358979323846
  67.  
  68.  
  69. #ifdef __cplusplus
  70.     #define TBEGIN_C_API extern "C" {
  71.     #define TEND_C_API }
  72. #else
  73.     #define TBEGIN_C_API
  74.     #define TEND_C_API
  75. #endif
  76.  
  77.  
  78. #endif
  79.